home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wlib11_2.zip / EXAMPLES.EXE / EXAM48.C < prev    next >
C/C++ Source or Header  |  1991-03-13  |  976b  |  29 lines

  1.   #include "window.h"
  2.   #include <string.h>
  3.   #define NORM   CREATE_VIDEO_ATTRIBUTE(black,white)
  4.  
  5.   WPOINTER w;
  6.   char buffer[80];
  7.   main()
  8.   {
  9.     int i,row,col;
  10.     buffer[0] = 0;   /* Make sure first character is null */
  11.     WindowInitializeSystem();
  12.     WindowSaveInitial(0);
  13.     w = WindowInitialize(BORDER,1,1,40,10,NORM,NORM,SINGLEBOX);
  14.     WindowOpen(w);
  15.     WindowDisplay(w,1,NOEFFECT);
  16.     buffer[0] = 0;   /* Make sure first character is NULL */
  17.     WindowWriteString(w,"Enter Your first name :",1,1);
  18.     WindowGetString(w,2,1,buffer,' ',0,40,0,"40.");
  19.     WindowWriteString(w,"You entered the following:",3,1);
  20.     WindowWriteString(w,buffer,4,1);
  21.     GET_KEY();
  22.     WindowWriteString(w,"Now Enter your last name:",6,1);
  23.  
  24.     /* Note that the last string is now used as a default */
  25.     WindowGetString(w,7,1,buffer,' ',0,40,0,"40.");
  26.     WindowWriteString(w,"You entered the following:",8,1);
  27.     WindowWriteString(w,buffer,9,1);
  28.   }
  29.